package com.vipsoft.ws.service.impl;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.vipsoft.ws.service.IDemoWebService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.jws.WebService;


@Component
@WebService(serviceName = "DemoWebService", // 与接口中指定的name一致
        targetNamespace = "http://service.ws.vipsoft.com" // 与接口中的命名空间一致,一般是接口的包名倒
        //endpointInterface="demo2.demo2.service.UserService")//服务接口全路径, 指定做SEI（Service EndPoint Interface）服务端点接口 加了冲突
)
public class DemoWebServiceImpl implements IDemoWebService {

    Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public String sayHello(String arg) {
        String result = StrUtil.format("WebService Sayhello {} => {}", arg, DateUtil.now());
        logger.info(result);
        return result;
    }
}
